package com.code.responsibility.handle;

/**
 * <p>销售总监、可以批准40%以内的折扣</p>
 *
 * @author hwf
 * @version 1.0
 * @date 2021/12/14 22:10
 */
public class Director extends PriceHandler {

    @Override
    public void priceDiscount(float discount) {
        if (discount <= 0.4) {
            System.out.format("%s批准了折扣：%.2f%n", this.getClass().getName(), discount);
        } else {
            successor.priceDiscount(discount);
        }
    }
}
